package com.siderakis.gwt.request;

import com.google.gwt.valuestore.shared.RecordChangedEvent;
import com.siderakis.gwt.request.NoteRecord;
import com.siderakis.gwt.request.NoteChangedHandler;
import org.springframework.roo.addon.gwt.RooGwtMirroredFrom;
import com.siderakis.Note;
import com.google.gwt.requestfactory.shared.ServerType;
import com.google.gwt.event.shared.GwtEvent.Type;
import com.google.gwt.requestfactory.shared.RequestFactory.WriteOperation;

@RooGwtMirroredFrom(Note.class)
@ServerType(type = Note.class)
public class NoteRecordChanged extends RecordChangedEvent<NoteRecord, NoteChangedHandler> {

    public static final Type<com.siderakis.gwt.request.NoteChangedHandler> TYPE = new com.google.gwt.event.shared.GwtEvent.Type<com.siderakis.gwt.request.NoteChangedHandler>();

    public NoteRecordChanged(NoteRecord record, WriteOperation writeOperation) {
        super(record, writeOperation);
    }

    public Type<com.siderakis.gwt.request.NoteChangedHandler> getAssociatedType() {
        return TYPE;
    }

    protected void dispatch(NoteChangedHandler handler) {
        handler.onNoteChanged(this);
    }
}
